package com.wkr.listen;

import com.wkr.bean.StringBean;
import com.wkr.container.MqContainer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 监听器类
 */
public class wkrmonitorMsgMdp {
    @Autowired
    private MqContainer mqContainer;

    private static final Logger log = LoggerFactory.getLogger(wkrmonitorMsgMdp.class);


    /**
     * 监听消息的监听方法
     * 将消息加入队列 wukangrong add
     */
    public void wkrAddMethodForMsg(StringBean stringBean){
        log.info("消息加入队列开始");
        mqContainer.pushQueue(stringBean);
        log.info("消息加入队列完成");
        log.info("队列数目:" + mqContainer.getQueue().size());
        log.info("队列内容:" + stringBean.toString());
    }
}
